<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let arr = [1, 3, 5, 6, 7, 8]
        let result = arr.reduce((previousValue, currentValue) => {
            return previousValue * currentValue;
        }, 1);
        console.log(result)
        for (let i = 0; i < arr.length; i++) {
            console.log(arr[i]);
        }
        for (item of arr) {
            console.log(item);
        }
        for (item in arr) {
            console.log(item, arr[item]);
        }
    </script>

</body>

</html>